﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using IQKS.AWP.BusinessObject;

namespace IQKS.AWP.DataAccessLayer
{
    public class CandidateResultEmailDAL
    {
        public DataSet GetCandidateResultEmail(params object[] param)
        {
            DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_GetCandidateResultEmail", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }
        public object SetResultEmail(params object[] param)
        {
            /*string objDs;

            try
            {
               objDs  = DataUtils.ExecuteDataset("Usp_SetResultEmail", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;*/
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetResultEmail", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }
        public object SetResultEmailDocument(params object[] param)
        {
            /*DataSet objDs;

            try
            {
                objDs = DataUtils.ExecuteDataset("Usp_SetResultEmailDocument", param);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;*/
            try
            {
                return DataUtils.ExecuteScalar("Usp_SetResultEmailDocument", param);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }
    }
}
